Name | entity potion effects modified |
Event Lines | <entity> potion effects modified
<entity> potion effects <change_action> |
Triggers | when an entity's potion effects change. |
Generated Examples | on camel potion effects modified:
after fish potion effects change_action: on wind_charge potion effects modified: after hanging potion effects change_action: |
Has Player | when the entity that has changed is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link. |
Has NPC | when the entity that has changed is an NPC. |
Switches | cause:<cause> to only process the event when it came from a specified cause.
effect:<effect type> to only process the event when a specified potion effect is applied. |
Contexts | <context.entity> returns the EntityTag.
<context.cause> returns the cause of the effect change, based on https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityPotionEffectEvent.Cause.html
<context.action> returns the action of the effect changed, which can be 'added', 'changed', 'cleared', or 'removed'
<context.override> returns whether the new potion effect will override the old.
<context.new_effect_data> returns the new potion effect (in the same format as EntityTag.effects_data) (if any).
<context.old_effect_data> returns the old potion effect (in the same format as EntityTag.effects_data) (if any).
<context.effect_type> returns the name of the modified potion effect type.
|
Determine | "OVERRIDE:<ElementTag(Boolean)>" to set whether the new potion effect should override. |
Cancellable | True - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false' |
Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
Group | Entity |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityPotionEffectScriptEvent.java#L17 |